#include "ProgressBar.h"

void RefreshProgressBar(double part,double total)
{
    int count = (part * 100) / total;
    char str[101] = { 0 };
    char ch[5]= {'|','\\','-','|','/'};
    static int n = 0;
    //memcpy(str,"#",count);
    for(int i = 0; i < count; i++)
        str[i] = '#';
    printf("[%-100s][%d\%][%c]\r",str,count,ch[n++]);
    fflush(stdout);
    n = n % 5; 
}
